<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue</title>
</head>
<body>
<!--第一步，导入Vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
<!--导入axios-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<div id='app' v-cloak>
    <div>{{info.name}}</div>
    <div>{{info.url}}</div>
    <div>{{info.address}}</div>
    <div>{{info.links}}</div>
    <a v-bind:href="info.url">点我进入百度</a>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data(){ //data方法
          return{
              info:{}
          }
        },
        mounted(){//钩子函数
            axios.get('../data.json').then(response=>(this.info=response.data));
        }
    });
</script>
</body>
</html>